home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- # Make a Solaris shared library
- # contributed by Arno Hahma (arno@nitro.pp.utu.fi)
-
- # First argument is name of output library
- # Rest of arguments are object files
-
- set -x
-
- LIBRARY=`basename $1 .a`
-
- shift 1
- OBJECTS=$*
-
- VERSION="2.2"
-
- echo "Building shared object $LIBRARY.so.$VERSION and the archive library $LIBRARY.a"
- rm -f ${LIBRARY}.a ${LIBRARY}.so.${VERSION}
- ar ruv ${LIBRARY}.a ${OBJECTS}
-
- ld -G -o ${LIBRARY}.so.${VERSION} ${OBJECTS}
-
- cp ${LIBRARY}.a ${LIBRARY}.so.${VERSION} ../lib
- cd ../lib
- ln -s ${LIBRARY}.so.${VERSION} ${LIBRARY}.so
-
-